import request from '@/utils/request'

// 获取水厂下拉列表
export function getFactoryList() {
  return request({
    url: '/operation/web/operationIndicatorColorConfig/factoryList',
    method: 'get'
  })
}

// 查询指标颜色配置列表
export function getIndicatorColorConfigList(params) {
  return request({
    url: '/operation/web/operationIndicatorColorConfig/list',
    method: 'get',
    params
  })
}

// 获取指标颜色配置详细信息
export function getIndicatorColorConfigDetail(colorConfigId) {
  return request({
    url: `/operation/web/operationIndicatorColorConfig/${colorConfigId}`,
    method: 'get'
  })
}

// 新增指标颜色配置
export function addIndicatorColorConfig(data) {
  return request({
    url: '/operation/web/operationIndicatorColorConfig',
    method: 'post',
    data
  })
}

// 修改指标颜色配置
export function updateIndicatorColorConfig(data) {
  return request({
    url: '/operation/web/operationIndicatorColorConfig',
    method: 'put',
    data
  })
}

// 删除指标颜色配置
export function deleteIndicatorColorConfig(colorConfigIds) {
  return request({
    url: `/operation/web/operationIndicatorColorConfig/${colorConfigIds}`,
    method: 'delete'
  })
}